#ifndef INQUIRESQL_H
#define INQUIRESQL_H

#include <QStringList>
//#include <QDesktopWidget>

#include "commodityattribute.h"
#include "categorysettings.h"
#include "personsupplier.h"
#include "commodity.h"
#include "purchaseorderform.h"
#include "personmember.h"
#include "personstaff.h"
#include "personstaffinformation.h"
#include "systemset.h"
#include "personmemberoperationdetails.h"
#include "memberoperationdetails.h"
#include "salesdetails.h"
#include "saleorderform.h"
#include "saledetail.h"
#include "staffresultclass.h"

class QString;

class InquireSql
{
public:
    InquireSql();

    QStringList inquire_staff_ID() const;
    QStringList inquireAllStaffName() const;
    QString InquireStaffName(const QString&) const;
    QString InquireStaffGender(const QString&) const;
    QString InquireStaffID(QString) const;
    QString inquire_staff_password(const QString) const;
    bool UpdatStaffMemberRecharge(const QString &, const QString &) const;
    staffList InquireStaffResultList(QString, QString) const;
    bool UpdateStaffPassword(const QString &, const QString&) const;
    staffInformationList InquireStaffInformationList() const;
    bool InsertStaffInformation(const PersonStaffInformation &) const;
    bool UpdateStaffInformation(const QString &, const PersonStaffInformation &) const;
    void DeleteStaffInformation(const QString &) const;
    bool UpdatStaffSalesResult(const StaffResultClass &) const;

    QStringList inquireOwnerName() const;
    QStringList inquireAllAttributeValue(int) const;

    attributelist InquireAttribute(int) const;
    void InsertAttribute(int, const CommodityAttribute &) const;
    void UpdateAttribute(int, const CommodityAttribute &) const;
    void DeleteAttribute(int, const QString &) const;
    bool AttributeIsUsed(int, const QString &) const;

    QString InquireAttributeValue(int, QString) const;

    supplierList InquireSupplier() const;
    QString InquireSupplierName(QString) const;
    QString InquireSupplierNumber(QString) const;
    bool InsertSupplier(const PersonSupplier &) const;
    bool UpdateSupplier(const PersonSupplier &) const;
    void DeleteSupplier(const QString &) const;
    bool SupplierIsUsed(const QString &) const;

    commodityList InquireCommodityInformation() const;
    Commodity InquireCommodityInformationValue(const QString &) const;
    QString InquireCommodityInternalCode(QString) const;
    QString InquireUnitNumber(QString) const;
    bool InsertCommodityInformation(const Commodity &) const;
    bool UpdateCommodityInformation(const Commodity &) const;
    void DeleteCommodityInformation(const QString &) const;

    PurchaseOrderFormList InquirePurchaseOrderForm(QString, QString) const;
    commodityList InquirePurchaseDetail(QString) const;
    bool InsertPurchaseOrderForm(const PurchaseOrderForm &) const;
    bool InsertpurchaseDetail(const commodityList &) const;
    bool DeletePurchaseOrderForm(const commodityList &) const;

    SaleOrderFormList InquireSalesOrderForm(QString, QString, int, QString) const;
    saleDetailList InquireSalesDetail(QString) const;
    saleDetailList InquireSalesList(QString, QString, int, QString) const;
    bool InsertSalesOrderForm(const SaleOrderForm &) const;
    bool InsertSalesDetail(const QString &,const saleDetailList &) const;


    memberList InquireMemberProfile() const;
    PersonMember InquireMemberInformation(const QString&) const;
    bool InsertMemberInformation(const PersonMember &) const;
    QString inquireMemberPassword(const QString&) const;
    bool UpdateMemberPassword(const QString &, const QString&) const;
    bool UpdatMemberInformation(const PersonMember&) const;
    bool UpdatMemberOver(const PersonMember&) const;
    void DeleteMemberInformation(const QString &) const;
    memberList InquireMemberLevel() const;
    bool InsertMemberLevel(const PersonMember &) const;
    bool UpdateMemberLevel(const PersonMember&) const;
    void DeleteMemberLevel(const QString &) const;
    QString InquireMemberLevelValue(QString) const;
    QStringList inquireAllMemberLevelValue() const;
    QString InquireMemberLevelNumber(const QString&) const;
    bool UpdatMemberCardAmount(const QString &, const QString &) const;
    MemberOperationDetailsList InquireMemberOperationDetails(QString, QString, int, QString) const;
    bool InsertMemberOperationDetails(const PersonMemberOperationDetails &) const;

    SystemSet InquireSystemSettingsInformation() const;
    bool UpdateSystemSettingsInformation(const SystemSet&) const;

    QStringList InventoryStatistics() const;
    QStringList MemberOperationDetailsStatistics(
            QString, QString, QString, QString, int, QString) const;

signals:

private:
    QString InquireAttributeNumber(int, const QString&) const;
};

#endif // INQUIRESQL_H
